package com.hospital.controller;


import com.hospital.configure.Result;
import com.hospital.entity.HealthItem;
import com.hospital.service.HealthItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author WuLiting
 * @since 2021-03-24
 */
@RestController
@RequestMapping("/healthItem")
public class HealthItemController {

    @Autowired
    HealthItemService healthItemService;

    /**
     * 添加/修改
     */
    @RequestMapping("/updateHealthItem")
    public Result<HealthItem> updateHealthItem(@RequestBody HealthItem healthItem) {
        return healthItemService.updateHealthItem(healthItem);
    }

    /**
     * 删除
     */
    @RequestMapping("/delHealthItem")
    public Result<HealthItem> delHealthItem(@RequestBody HealthItem healthItem) {
        return healthItemService.delHealthItem(healthItem);
    }

    /**
     * 批量删除
     */
    @RequestMapping("/batchDelHealthItem")
    public Result<HealthItem> batchDelHealthItem(@RequestBody HealthItem healthItem) {
        return healthItemService.batchDelHealthItem(healthItem);
    }

    /**
     * 查询(不分页)
     */
    @RequestMapping("/queryHealthItem")
    public Result<HealthItem> queryHealthItem(@RequestBody HealthItem healthItem) {
        return healthItemService.queryHealthItem(healthItem);
    }

    /**
     * 查询(分页)
     */
    @RequestMapping("/queryHealthItemByPage")
    public Result<HealthItem> queryHealthItemByPage(@RequestBody HealthItem healthItem) {
        return healthItemService.queryHealthItemByPage(healthItem);
    }

    /**
     * 根据ID查询
     */
    @RequestMapping("/queryHealthItemById")
    public Result<HealthItem> queryHealthItemById(@RequestBody HealthItem healthItem) {
        return healthItemService.queryHealthItemById(healthItem);
    }

}

